package com.simplenix.nicasio.hmaint;

import com.simplenix.nicasio.hmaint.util.HMaintUtil;
import com.simplenix.nicasio.misc.AppException;
import com.simplenix.nicasio.tags.Maint;
import java.util.Map;

/**
 *
 * @author fronald
 */
public class DefaultCustomAdd implements CustomAdd {

	public void doAdd(Map reg, EntityDefinition ed) throws HMaintException, AppException {
		HMaintUtil.addOrUpdate(reg, ed.getEntityClass());
	}

	public String getHtml(EntityDefinition ed, String backTo) throws AppException, HMaintException {
		return Maint.loadForm(ed, null);
	}

}
